<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">

<head>
  <title></title>
  <meta charset="utf-8">
  <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  <link rel="stylesheet" href="css/fonts/font-awesome.min.css">
  <link rel="stylesheet" href="css/ui-box.css">
  <link rel="stylesheet" href="css/ui-base.css">
  <link rel="stylesheet" href="css/ui-color.css">
  <link rel="stylesheet" href="css/appcan.icon.css">
  <link rel="stylesheet" href="css/appcan.control.css">
  <link rel="stylesheet" href="css/BaggageTrace.css">
  <link rel="stylesheet" href="css/base.css">

</head>

<body class="um-vp bcEAF2F4" ontouchstart>
  <main class="bcFFF">
      <img src="images/bg.png" style="display:none;" />    
    <canvas id = "watermark" width = "200px"  height = "100px" style="display:none;"></canvas>
    <canvas id = "repeat-watermark"></canvas>
    <ul class="BaggageList" id="BaggageList">
      <!-- <li class="listItems pt10 bor_bot2_D7D7D7 fs9 pb10">
        <section class="ub ub-pj lh25">
          <div class="ub">
            <p class="h_inherit icons_style icons_src_BT_contacts ml5 mr5"></p>
            <p>夜莺</p>
          </div>
          <div class="ub pr10">
            <p class="h_inherit icons_style icons_src_BT_date ml5 mr5"></p>
            <p>2017-08-31</p>
          </div>
        </section>
        <section class="ub lh20 pr5">
          <div class="ub-f3 pre">
            <div class="ub">
              <p class="h_inherit icons_style icons_src_BT_flight ml5 mr5 h20"></p>
              <p class="pab wh100">上海浦东国</p>
            </div>
          </div>
          <div class="ub-f1">
            <p class="pre top-10 tx-c pl5 pr5 bor_bot2_6181CA">MU292</p>
          </div>
          <div class="ub-f3 tx-r pre">
            <p class="pab wh100">西安咸阳机场</p>
          </div>
        </section>
        <section class="ub lh20">
          <div class="ub">
            <p class="h_inherit icons_style icons_src_BT_baggage ml5 mr5"></p>
            <p class="pl5">3333333333</p>
          </div>
        </section>
      </li> -->

    </ul>
  </main>

</body>
<script src="js/appcan.js"></script>
<script src="js/appcan.control.js"></script>
<script src="js/jquery-3.1.1.min.js"></script>
<script src="js/z_API.js"></script>
<script src="js/talkingdata.js"></script>
<script>
  appcan.ready(function() {
      iG.bgm();
    var http = appcan.locStorage.getVal("baggageHttp");

    var baggageList = JSON.parse(appcan.locStorage.getVal("baggageList"));
    //console.log(baggageList);
    if (baggageList.bags && baggageList.bags.length > 0) {
      var remark = "航班号:" + baggageList.flightNo + ",出发站三字码:" + baggageList.airport + ",到达站三字码:" + baggageList.destination + ",航班日期:"+baggageList.flightDate + ",操作时间:" + getNowDateHourMinutes();
      operatingRecord(userName,"行李查询",remark);
      var template = "";
      baggageList.bags.forEach(function(item) {
        if(!item.psnName){
          item.psnName = "未知";
        }
        if(!item.airportName){
          item.airportName = "未知";
        }
        if(!item.destinationName){
          item.destinationName = "未知";
        }
        item.flightDate = timestampTransitionDate(item.flightDate);

        template += '<li class="listItems pt10 bor_bot2_D7D7D7 fs9 pb10" data-id="'+item.id+'">' +
          '<section class="ub ub-pj lh25">' +
          '<div class="ub">' +
          '<p class="h_inherit icons_style icons_src_BT_contacts ml5 mr5">' +
          '</p>' +
          '<p>' + item.psnName + '</p>' +
          '</div>' +
          '<div class="ub pr10">' +
          '<p class="h_inherit icons_style icons_src_BT_date ml5 mr5"></p>' +
          '<p>' + item.flightDate + '</p>' +
          '</div>' +
          '</section>' +
          '<section class="ub lh20 pr5 ">' +
          '<div class="ub-f3 pre tx-l">' +
          '<div class="ub">' +
          '<p class="h20 icons_style icons_src_BT_flight ml5 mr5"></p>' +
          '<p class="pab wh100">' + item.airportName +'</p>' +
          '</div>' +
          '</div>' +
          '<div class="ub-f1">' +
          '<p class="pre top-10 tx-c pl5 pr5 bor_bot2_6181CA">' + item.flightNo + '</p>' +
          '</div>' +
          '<div class="ub-f3 pre tx-r">' +
          '<p class="pab wh100">' + item.destinationName + '</p>' +
          '</div>' +
          '</section>' +
          '<section class="ub lh20">' +
          '<div class="ub">' +
          '<p class="h_inherit icons_style icons_src_BT_baggage ml5 mr5"></p>' +
          '<p class="pl5">' + item.bagNo + '</p>' +
          '</div>' +
          '</section>' +
          '</li>'
      });

      $("#BaggageList").html(template);

      appcan.button(".listItems", " btn-act", function() {
        
        IC.talkingDataCount("行李服务","16");
        
        var id = $(this).attr("data-id");
        //id = "5c6c73d721254d4a83a0efd44da521bd";
        var param = {
          bagId:id,
          token:token
        }
        var res = new AJAXRequestData({
          url:http+"zyh_bagOpLog",
          type:"POST",
          data:param,
        },function(res){
          var remark = "航班号:" + baggageList.flightNo +",出发站三字码:" + res.airport + ",到达站三字码:" + res.destination + ",航班日期:"+baggageList.flightDate + ",操作时间:" + getNowDateHourMinutes();
          operatingRecord(userName,"行李进度查询",remark);
          appcan.locStorage.setVal("baggageSchedule",res);
          appcan.window.open({
            name: "BaggageSchedulePage",
            dataType: 0,
            aniId: 5,
            data: "BaggageSchedulePage.html",

          });
        });
      });
    }else{

     notData("#BaggageList");
    }

  });


</script>

</html>
